From 6611e3a187e5398f686449938b7cf1ddbfcb5392 Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Thu, 7 Dec 2023 11:11:53 -0500
Subject: Store amounts as cents

---
 src/app/groups/[groupId]/reimbursement-list.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/app/groups/[groupId]/reimbursement-list.tsx')

diff --git a/src/app/groups/[groupId]/reimbursement-list.tsx b/src/app/groups/[groupId]/reimbursement-list.tsx
index e8400ca..54ee9d7 100644
--- a/src/app/groups/[groupId]/reimbursement-list.tsx
+++ b/src/app/groups/[groupId]/reimbursement-list.tsx
@@ -16,6 +16,14 @@ export function ReimbursementList({
   currency,
   groupId,
 }: Props) {
+  if (reimbursements.length === 0) {
+    return (
+      <p className="px-6 text-sm pb-6">
+        It looks like your group doesn’t need any reimbursement 😁
+      </p>
+    )
+  }
+
   const getParticipant = (id: string) => participants.find((p) => p.id === id)
   return (
     <div className="text-sm">
@@ -35,7 +43,7 @@ export function ReimbursementList({
             </Button>
           </div>
           <div>
-            {currency} {reimbursement.amount.toFixed(2)}
+            {currency} {(reimbursement.amount / 100).toFixed(2)}
           </div>
         </div>
       ))}
-- 
cgit v1.3

